<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let arr=['赵云','黄忠','关羽','张飞','马超','刘备','曹操']
        let num=Math.floor(Math.random()*7)
        document.write(arr[num])
        arr.splice(num)
        console.log(arr)
    </script>
</body>
</html>